const mysql = require('mysql2')

const pool = mysql.createPool({
    connectionLimit:10,
     host:'localhost',
    user:'testJH',
    password:'3fCpptbSTb5sbDsx',
    database:'testJH'
})

// const connection = mysql.createConnection({
//     host:'localhost',
//     user:'testJH',
//     password:'3fCpptbSTb5sbDsx',
//     database:'testJH'
// })

// connection.connect(err=>{
//     if(err){
//         console.log(err);
        
//         console.error('数据库连接失败')
//         return
//     }
//     console.log('数据库连接成功');
    
// })

module.exports = pool
